Complement ExtractDofsonBorder for vectorial finite element space#184
Open
zhaog6 wants to merge 1 commit intoFreeFem:developfrom
Open
Complement ExtractDofsonBorder for vectorial finite element space#184zhaog6 wants to merge 1 commit intoFreeFem:developfrom
ExtractDofsonBorder for vectorial finite element space#184zhaog6 wants to merge 1 commit intoFreeFem:developfrom
Conversation
Member
|
I'm not really sure that this is needed. You could just get the border with a P_1 finite element space and then multiply and shift to get a "multi-component" border. |
Contributor
Author
You are right. I ignored the shortcut. |
Contributor
Author
|
But for |
Member
|
It won't be as easy for [P2, P2, P1], but your code won't work either for such a fespace, I guess. |
Contributor
Author
|
I try it, from the result of plot, it looks like ok when I run the following code, and the number of DOFs on the border seems ok. include "ExtractDofsonBorder.idp"
macro fe() [P2, P2, P1] //
mesh Th = square(64, 64);
int[int] labs = 1 : 3;
int[int] doflabs;
fespace Vh(Th, fe);
ExtractDofsonBorder(labs, Vh, doflabs, 1, 3);
Vh [uh, vh, ph] = [0, 0, 0];
for (int j = 0; j < doflabs.n; ++j) {
uh[][doflabs[j]] = 1;
}
plot(uh, cmm="uh", wait=1);
plot(vh, cmm="vh", wait=1);
plot(ph, cmm="ph", wait=1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR supports extracting DOFs from border for vectorial finite element space.